package com.maigao.util;

import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;

/**
 * @program: denyhub
 * @description:
 * @author: yongza
 * @create: 2021-08-21 00:14
 **/
public class GlobalIdGenerator {
    /**
     * 生成规则: 当前时间戳+6位随机数字
     *
     * @return
     */
    public static String genId() {
        return StringUtils.join(System.currentTimeMillis(), RandomStringUtils.randomNumeric(6));
    }

}
